<template>
  <h1>El-选择器组件</h1>
  <el-select v-model="city" placeholder="请选择你喜欢的城市"
             style="width:20%;">
    <el-option label="上海" value="上海"/>
    <el-option label="苏州" value="苏州"/>
    <el-option label="北京" value="北京"/>
    <el-option label="杭州" value="杭州"/>
    <el-option label="成都" value="成都"/>
  </el-select>
  <h4>你选择的城市为{{ city }}</h4>
</template>

<script setup>
import {ref} from "vue";

const city = ref('');
</script>

<style scoped>

</style>